<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta name="format-detection" content="telephone=no" />
    <title>title</title>
    <link rel="stylesheet" type="text/css" href="../css/api.css"/>
    <style>
        html, body {
            background-color: #f8f8f8;
        }
        .fail_box {
        	display: none;
        }
        .main {
        	background-color: #fff;
        	padding: 65px 0 70px;
        	text-align: center;
        	margin-bottom: 20px;
        }
        .main img {
        	height: 54px;
        	margin-bottom: 14px;
        }
        .main p {
        	color: #333;
        	font-size: 17px;
        }
        .btn_box {
			padding: 0 15px;
        }
        .btn_box .btn {
			width: 100%;
			height: 39px;
			line-height: 39px;
			font-size: 16px;
			text-align: center;
			border-radius: 5px;
			margin-bottom: 16px;
			background-color: #e62442;
			color: #fff;
        	border: 1px solid #e62442;
        	box-sizing: border-box;
        }
        .btn_box .btn:last-child {
        	margin-bottom: 0;
        	background-color: #fff;
        	color: #e62442;
        }
    </style>
</head>
<body>
    <div class="success_box">
    	<div class="main">
    		<img src="../image/success.png">
    		<p>支付成功</p>
    	</div>
    	<div class="btn_box">
    		<div class="btn" onclick="fnOrderDetail();" tapmode>查看订单</div>
    		<div class="btn" onclick="api.closeToWin({name: 'root'});" tapmode>继续订单</div>
    	</div>
    </div>
    <div class="fail_box">
    	<div class="main">
    		<img src="../image/prompt.png">
    		<p>支付失败</p>
    	</div>
    	<div class="btn_box">
    		<div class="btn">继续支付</div>
    		<div class="btn">返回</div>
    	</div>
    </div>
</body>
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript">
    apiready = function(){
        order_id = api.pageParam.order_id;
        where_from = api.pageParam.where_from;
        api.sendEvent({
            name: 'closeSubmitOrder',
            extra: {
            }
        });
    };

    function fnOrderDetail() {
        api.openWin({
            name: 'order_detail2',
            url: './order_detail2.html',
            pageParam: {
                id: order_id,
                where_from: where_from,
                status : 1
            }
        });
        
    }
</script>
</html>